<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>城市运费单价管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
		});
	</script>
</head>
<body class="gray-bg">
	<div class="wrapper wrapper-content">
	<div class="ibox">
	<div class="ibox-title">
		<h5>城市运费单价列表 </h5>
	</div>
    <div class="ibox-content">
	<sys:message content="${message}"/>
	
	<!--查询条件-->
	<div class="row">
	<div class="col-sm-12">
	<form:form id="searchForm" modelAttribute="logisFreightPrice" action="${ctx}/logis/logisFreightPrice/" method="post" class="form-inline">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
		<div class="form-group">
			<span>出发城市：</span>
				<form:input path="startCity" htmlEscape="false" maxlength="32"  class=" form-control input-sm"/>
			<span>目的城市：</span>
				<form:input path="endCity" htmlEscape="false" maxlength="32"  class=" form-control input-sm"/>
			<div class="pull-right">
				<button  class="btn btn-primary btn-sm " onclick="search()" ><i class="fa fa-search"></i> 查询</button>
			</div>
		 </div>	
	</form:form>
	<br/>
	</div>
	</div>
	
	<!-- 工具栏 -->
	<div class="row">
	<div class="col-sm-12">
		<div class="pull-left">
			<shiro:hasPermission name="logis:logisFreightPrice:add">
				<table:addRow url="${ctx}/logis/logisFreightPrice/form" title="城市运费单价" width="680px" height="500px"></table:addRow><!-- 增加按钮 -->
			</shiro:hasPermission>

	       <button class="btn btn-white btn-sm " data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i> 刷新</button>
		
			</div>
		
	</div>
	</div>
	
	<!-- 表格 -->
	<table id="contentTable" class="table table-striped table-bordered table-hover table-condensed dataTables-example dataTable">
		<thead>
			<tr>
				<th  class="sort-column startCity">出发城市</th>
				<th  class="sort-column endCity">目的城市</th>
				<th  class="sort-column endArea">目的区</th>
				<th  class="sort-column unitPrice">整车单价(元/吨)</th>
				<th  class="sort-column returnUnitPrice">整车返程单价(元/吨)</th>
				<th  class="sort-column unitPrice2">零担单价(元/吨)</th>
				<th  class="sort-column returnUnitPrice2">零担返程单价(元/吨)</th>
				<th>里程(km)</th>
				<th>里程参考价</th>
				<th>单价基数</th>
				<th>返程基数</th>
                <th>司机报价</th>
                <th>指数</th>
                <th>返程报价</th>
                <th>返程指数</th>
				<th width="8%">操作</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="logisFreightPrice">
			<tr>
				<td>
					${logisFreightPrice.startCity}
				</td>
				<td>
					${logisFreightPrice.endCity}
				</td>
				<td>
						${logisFreightPrice.endArea}
				</td>
				<td>
					${logisFreightPrice.unitPrice}
				</td>
				<td>
					${logisFreightPrice.returnUnitPrice}
				</td>
				<td>
						${logisFreightPrice.unitPrice2}
				</td>
				<td>
						${logisFreightPrice.returnUnitPrice2}
				</td>
				<td>
						${logisFreightPrice.distance}
				</td>
				<td>
						${logisFreightPrice.referPrice}
				</td>
				<td>
						${logisFreightPrice.unitPriceBase}
				</td>
				<td>
						${logisFreightPrice.returnUnitPriceBase}
				</td>
                <td>
                        ${logisFreightPrice.driverPrice}
                </td>
                <td>
                        ${logisFreightPrice.score}
                </td>
                <td>
                        ${logisFreightPrice.driverPrice2}
                </td>
                <td>
                        ${logisFreightPrice.score2}
                </td>


                <td>
					
					<shiro:hasPermission name="logis:logisFreightPrice:edit">
    					<a href="#" onclick="openDialog('修改城市运费单价', '${ctx}/logis/logisFreightPrice/form?id=${logisFreightPrice.id}','680px', '500px')" class="btn btn-success btn-xs" ><i class="fa fa-edit"></i> 修改</a>
    				</shiro:hasPermission>
    				<shiro:hasPermission name="logis:logisFreightPrice:del">
						<a href="${ctx}/logis/logisFreightPrice/delete?id=${logisFreightPrice.id}" onclick="return confirmx('确认要删除该城市运费单价吗？', this.href)"   class="btn btn-danger btn-xs"><i class="fa fa-trash"></i> 删除</a>

                        <a href="${ctx}/logis/logisFreightPrice/driverPrice?id=${logisFreightPrice.id}&driverPrice=" onclick="return promptx('请输入司机报价？', this.href)"   class="btn btn-info btn-xs">测试报价</a>
                        <a href="${ctx}/logis/logisFreightPrice/driverPrice2?id=${logisFreightPrice.id}&driverPrice2=" onclick="return promptx('请输入司机返程报价？', this.href)"   class="btn btn-info btn-xs">测试返程报价</a>
                    </shiro:hasPermission>
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	
		<!-- 分页代码 -->
	<table:page page="${page}"></table:page>
	<br/>
	<br/>
	</div>
	</div>
</div>
</body>
</html>